package com.xl.juc.function;

import java.util.function.Consumer;

/**
 * 消费型接口：只有一个输入参数，没有返回值
 * @author Charley
 * @create 2021-01-24
 */
public class consumerInterface {
    public static void main(String[] args) {
        /*Consumer<String> consumer =new Consumer<String>(){
            @Override
            public void accept(String s) {
                System.out.println(s);
            }
        };*/
        Consumer<String> consumer =(str)->{ System.out.println(str);};
        consumer.accept("aa");
    }
}
